home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.cs.arizona.edu
/
ftp.cs.arizona.edu.tar
/
ftp.cs.arizona.edu
/
icon
/
newsgrp
/
group98c.txt
/
000124_icon-group-sender _Thu Dec 10 09:33:34 1998.msg
< prev
next >
Wrap
Internet Message Format
|
2000-09-20
|
3KB
Return-Path: <icon-group-sender>
Received: (from root@localhost)
by baskerville.CS.Arizona.EDU (8.9.1a/8.9.1) id JAA08163
for icon-group-addresses; Thu, 10 Dec 1998 09:32:04 -0700 (MST)
Message-Id: <199812101632.JAA08163@baskerville.CS.Arizona.EDU>
Date: Wed, 09 Dec 1998 20:03:16 -0600
From: MJE <evans.nospam@gte.net>
To: icon-group@optima.CS.Arizona.EDU
Subject: Re: Formatting Reals
Errors-To: icon-group-errors@optima.CS.Arizona.EDU
Status: RO
Everyone is picking me apart for my humble suggestion. Clint likes it,
that will be my consolation prize. Let me move on. It appears that we
have a much more pressing need in Icon than a "past" keyword.
That is, intrinsic calls to format numbers. I am trying to process
spreadsheet data and am finding it impossible to get real numbers
formatted without a lot of overhead in Icon.
Icon also fails to clarify whether internal reals are single or double.
I guess I'll have to examine the source. If there is to be only one
type of real, it should be double precision.
The Icon libraries for printf-like formatting are "printf" and "numbers"
but both of them involve interpreted string scanning. How silly: A
string scanning language that can't format numbers intrinsically. All
it would take is a direct pass-through to C library printf capability.
So it looks to me like Icon desperately needs some numeric formatting
capability. I can live without the "past" intrinsic, but I'll be in a
rocking chair before my need for number formatting dies away.
Has anyone written a Windows DLL to give access to C's printf?
Mark
Richard A. O'Keefe wrote:
>
> What everyone is missing about procedures-that-do-the-job is the speed
> consideration. Think about embedding either procedure in a deep inner
> loop of some kind. At that point, it is much preferable to have a
> keyword, which
>
> (a) avoids any overhead of procedure calling,
>
> (b) doesn't have to both find and then match the same text
> (redundancy),
>
> (c) simplifies the code readability
>
> Concerning (a), just what _is_ the procedure call overhead?
> It's only worth worrying about if
> (1) it is large compared with the useful work done (is it large?)
> (2) the compiler is unable to expand calls to it in-line (is it unable?)
> (3) there's nothing else going on in that loop with worse overheads.
>
> Concerning (c), I note that realistic programming languages have to deal
> with huge libraries these days. Not the current UNIX interface (the
> Single UNIX Specification one) but the _previous_ one was called Spec1170
> because it had 1170 functions in the interface. Windows has even more.
> If procedure calls are unreadable, then heaven help us.
>
> Concerning (b), is this the _only_ situation where that problem comes
> up? I don't think so. Just how many keywords are we going to need if
> we try to solve them all by keywords?